﻿<Controls:Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Elysium.Controls;assembly=Elysium"
        xmlns:params="http://schemas.codeplex.com/elysium/params"
    
        xmlns:local="clr-namespace:SynTorrent" xmlns:SynologyWebApi="clr-namespace:SynologyWebApi;assembly=SynologyWebApi" 
        x:Class="SynTorrent.ConnectWindow"
        Height="317" Width="438" 
        ResizeMode="NoResize" WindowStartupLocation="CenterScreen" 
        Title="SynTorrent Account Settings" Topmost="True" ShowInTaskbar="False">

    <Controls:Window.Effect>
        <DropShadowEffect/>
    </Controls:Window.Effect>
    <Controls:Window.DataContext>
        <SynologyWebApi:DownloadStationApi/>
    </Controls:Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="0*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Server and User Account Settings" HorizontalAlignment="Left" Margin="31,10,0,0" VerticalAlignment="Top" FontSize="18" Foreground="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
        <TextBlock Text="Address" HorizontalAlignment="Left" Margin="31,54,0,0" VerticalAlignment="Top" Width="120" Height="18"/>
        <TextBlock Text="Login" HorizontalAlignment="Left" Margin="31,82,0,0" VerticalAlignment="Top" RenderTransformOrigin="0,-0.5" Width="120" Height="23"/>
        <TextBlock Text="Password" HorizontalAlignment="Left" Margin="31,117,0,0" VerticalAlignment="Top" RenderTransformOrigin="5.105,-0.115" Width="120" Height="23"/>
        <TextBox x:Name="Address" HorizontalAlignment="Left" Height="23" Margin="151,51,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="Address_TextChanged"/>
        <TextBox x:Name="LoginName" HorizontalAlignment="Left" Height="23" Margin="151,82,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Text="{Binding Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="LoginName_TextChanged"/>
        <PasswordBox x:Name="Password" HorizontalAlignment="Left" Margin="151,117,0,0" VerticalAlignment="Top" Width="120"/>
        <Button x:Name="LoginButton" Content="Login" HorizontalAlignment="Left" Margin="326,216,0,0" VerticalAlignment="Top" Width="91" Height="44" IsDefault="True" Click="LoginButton_Click" IsEnabled="{Binding ReadyToLogin, Mode=OneWay}"/>
        <StatusBar HorizontalAlignment="Left" Height="101" Margin="10,178,0,0" VerticalAlignment="Top" Width="316"
			Background="{DynamicResource BackgroundBrush}"
			Foreground="{DynamicResource ForegroundBrush}">
            <TextBlock x:Name="ConnectionStatusLabel" Width="306" Height="82" FontSize="14" TextWrapping="Wrap" TextOptions.TextHintingMode="Animated" Text="{Binding ProgressMessage}"/>
        </StatusBar>
        <CheckBox x:Name="UseHTTPS" Content="Use HTTPS" HorizontalAlignment="Left" Margin="286,54,0,0" VerticalAlignment="Top" IsChecked="{Binding UseHTTPS, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Checked="UseHTTPS_Checked" Unchecked="UseHTTPS_Unchecked"/>
        <CheckBox x:Name="TrustConnectionCheckBox" Content="I trust this connection" HorizontalAlignment="Left" Margin="31,145,0,0" VerticalAlignment="Top" Width="240" ToolTip="Enable if you use https and your server does not have a valid certificate" IsChecked="{Binding TrustedConnection}" IsEnabled="False"/>

    </Grid>
</Controls:Window>
